﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExceptionsReportNoWithoutActual.aspx.cs" Inherits="MLY.Reports.DataReports.ExceptionsReportNoWithoutActual" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title><asp:Literal ID="TitleLiteral" runat="server" Text="<%$Dict:reportsParams.ReportNoWithoutActual %>"></asp:Literal></title>
    
    <link href="/Style/General_Style_v9.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/ReportsStylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:ToolkitScriptManager ID="ScriptManager1" runat="server"></asp:ToolkitScriptManager>
    
    <asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional">
    <Triggers>
        <asp:PostBackTrigger ControlID="ExportToExcelButton"  />
    </Triggers>
    <ContentTemplate>
    <asp:Panel ID="DirectionPanel" runat="server">
        <asp:Label ID="ReportTitleLabel" runat="server" Text="<%$Dict:reportsParams.ReportNoWithoutActual %>" CssClass="TitleStyle"></asp:Label>
        <br /><br />
        <table>
        <tr>
        <td>
            <asp:Label ID="DateStringTitleLabel" runat="server" Text='<%$Dict:advancedRptPrams.chooseDateFilter: %>'></asp:Label>
        </td>
        <td>
            <asp:DropDownList runat="server" ID="ddlLateOrderColumnDate">
                <asp:ListItem Text="<%$Dict:clientAddWo.SendDate %>" Value="1"></asp:ListItem>
                <asp:ListItem Text="<%$Dict:clientAddWo.PlannedDelivaryDate %>" Value="2"></asp:ListItem> 
                <asp:ListItem Text="<%$Dict:clientAddWo.DateFieldB %>" Value="3"></asp:ListItem>                                                                
            </asp:DropDownList>
        </td>
        </tr>
        <tr>
        <td>
            <asp:Label ID="DateFromTitleLabel" runat="server" Text='<%$Dict:reportsParams.Between %>'></asp:Label>
        </td>
        <td>
            <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtFromDate"></KBMControls:KBMReadOnlyTxtBox>
            <KBMValidators:requiredValidator ID="RequiredValidator1" runat="server" ControlToValidate="txtFromDate" ErrorMessage='<%$Dict:reportsParams.MustChooseBetweenTime %>'>
            </KBMValidators:requiredValidator>
            <KBMControls:KbmCalendar TargetControlID="txtFromDate" runat="server" ID="KbmCalendar1">
            </KBMControls:KbmCalendar>
        </td>
        </tr>
        <tr>
        <td>
            <asp:Label ID="DateTillTitleLabel"  runat="server"  Text='<%$Dict:reportsParams.And %>'></asp:Label>
        </td>
        <td>
            <KBMControls:KBMReadOnlyTxtBox runat="server" ID="txtToDate"></KBMControls:KBMReadOnlyTxtBox>
            <%--<KBMValidators:BiggerThenEqualDateValidator ID="BiggerThenEqualDateValidator1" Display="None"
                errorMessage='<%$Dict:reportsParams.ToDateSmallerThenFromDate %>' ControlToCompare="txtFromDate"
                ControlToValidate="txtToDate" runat="server"></KBMValidators:BiggerThenEqualDateValidator>--%>
            <KBMValidators:requiredValidator ID="RequiredValidator2" ControlToValidate="txtToDate" ErrorMessage='<%$Dict:reportsParams.MustChooseToDate %>'
                runat="server"></KBMValidators:requiredValidator>
            <KBMControls:KbmCalendar TargetControlID="txtToDate" runat="server" ID="Calendar1">
            </KBMControls:KbmCalendar>
        </td>
        </tr>
        </table>
        <asp:Button ID="CreateReportButton" runat="server" Text="<%$Dict:General.Submit %>" OnClick="Submit" />
        <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel" runat="server">
            <ProgressTemplate>
                <asp:Image ImageUrl="~/Images/ajax-loaderBar.gif" runat="server" />
            </ProgressTemplate>
        </asp:UpdateProgress>
        <br /><hr /><br />
        <asp:ImageButton ID="ExportToExcelButton" runat="server" ImageUrl="~/Images/excel.gif" OnClick="ExportToExcel" Visible="false" />
        <br /><br />
        <asp:GridView ID="DataGrid" runat="server" AutoGenerateColumns="false" AllowPaging="true" PageSize="200">
         <Columns>
            <asp:BoundField DataField="CustomerWorkOrderNumber" HeaderText="Work order number" 
            HeaderStyle-BackColor="#86C2FF"  />
            <asp:BoundField DataField="ContractorWorkOrderNumber" 
             HeaderText="Contractor Order Number" HeaderStyle-BackColor="#86C2FF"/>
             <asp:BoundField DataField="CustomerCatalougeCode" HeaderText="Customer catalogue code" 
            HeaderStyle-BackColor="#86C2FF"  />
            
            
            <asp:TemplateField HeaderText="Send Date"  >
            <HeaderStyle BackColor="#86C2FF" />
            <ItemTemplate>
            <%# FormatDate(Eval("SendDate"))%>
            </ItemTemplate>               
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="Requested delivery date" >
            <HeaderStyle BackColor="#86C2FF" />
            <ItemTemplate>
            <%# FormatDate(Eval("RequestedDelivaryDate"))%>                
            </ItemTemplate>                
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="Planned delivery date">
            <HeaderStyle BackColor="#86C2FF" />
            <ItemTemplate>
            <%# FormatDate(Eval("PlannedDelivaryDate"))%>
            </ItemTemplate>                
            </asp:TemplateField>
            
            <asp:BoundField DataField="OrderNumber" HeaderText="Contractor order number" HeaderStyle-BackColor="#86C2FF"  />
            <asp:BoundField DataField="TextFieldA" HeaderText="Customer Service Manager" HeaderStyle-BackColor="#86C2FF"   />
            <asp:BoundField DataField="TextFieldB" HeaderText="$" HeaderStyle-BackColor="#86C2FF"  />
            <asp:BoundField DataField="TextFieldC" HeaderText="<%$ Dict:TextFieldC %>" HeaderStyle-BackColor="#86C2FF"   />
            
            <asp:TemplateField HeaderText="Supplier Approval" >
            <HeaderStyle BackColor="#86C2FF" />
            <ItemTemplate>
            <%# FormatDate(Eval("DateFieldA"))%>
            </ItemTemplate>                
            </asp:TemplateField>
        
            <asp:TemplateField HeaderText="Customer Approval" >
            <HeaderStyle BackColor="#86C2FF" />
            <ItemTemplate>
            <%# FormatDate(Eval("DateFieldB"))%>
            </ItemTemplate>
            </asp:TemplateField>
         </Columns>
        
        </asp:GridView>
    </asp:Panel>
    <asp:SqlDataSource ID="DataSource" runat="server" SelectCommandType="StoredProcedure"
        ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" SelectCommand="ExceptionsReportNoWithoutActual"></asp:SqlDataSource> 
    </ContentTemplate>
    </asp:UpdatePanel>
    
    </div>
    </form>
</body>
</html>
